Skip to content

Comments

refactor: 토큰을 Stateless하게 관리하기 위한 Redis 적용 및 토큰 관리 과정 수정 / #61#62

Merged
JayongLee merged 11 commits intomainfrom
refactor/#61
Dec 4, 2025
Merged

refactor: 토큰을 Stateless하게 관리하기 위한 Redis 적용 및 토큰 관리 과정 수정 / #61#62
JayongLee merged 11 commits intomainfrom
refactor/#61

Conversation

@JayongLee
Copy link
Member

@JayongLee JayongLee commented Dec 4, 2025

🗞️ 연관된 이슈

🔥 이슈번호

✅ 작업 내용

  • RefreshToken 관리를 위한 Redis 도입
  • 기존 Token 관리 주체 변경 (OAuth2Authorization -> Redis Based Authorization)
  • Refresh Token 관리 설정 (Redis)
  • Redis 관련 설정
  • JWK 엔드포인트 응답값 캐싱
  • HealthCheck Endpoint 개방

📸 스크린샷 (선택)

체크리스트 ✅

  • 코드가 정상적으로 컴파일되나요?
  • merge할 브랜치의 위치를 확인했나요?
  • 테스트 코드를 작성하셨나요?

기타

@gemini-code-assist
Copy link

Summary of Changes

Hello @JayongLee, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 Pull Request는 인증 서버의 토큰 관리 방식을 근본적으로 개선하기 위해 Redis를 도입하여 Refresh Token을 Stateless하게 관리하도록 리팩토링합니다. 이를 통해 서버 재시작 시에도 Refresh Token의 유효성이 유지되며, 토큰 갱신 및 폐기 로직이 더욱 견고해집니다. 또한, JWK 엔드포인트 응답 캐싱과 헬스 체크 엔드포인트 개방을 통해 시스템의 성능과 운영 편의성을 향상시킵니다.

Highlights

  • Redis 도입: 토큰을 Stateless하게 관리하기 위해 Redis를 도입하여 Refresh Token을 Redis에 저장하고 관리하도록 변경했습니다.
  • 토큰 관리 주체 변경: 기존의 OAuth2Authorization (JPA 기반)에서 Redis 기반의 Authorization 서비스로 토큰 관리 주체를 변경했습니다.
  • Refresh Token 관리 기능: Refresh Token의 저장, 검증, 갱신(rotation), 폐기 기능을 구현하여 토큰 보안 및 효율성을 높였습니다.
  • JWK 엔드포인트 캐싱: JWK(JSON Web Key) Set 엔드포인트 응답을 Redis에 캐싱하여 성능을 최적화했습니다.
  • HealthCheck 엔드포인트 개방: /actuator/health/actuator/info 엔드포인트를 개방하여 시스템 상태 모니터링을 용이하게 했습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

안녕하세요. 이번 PR은 토큰 관리를 Stateless하게 변경하기 위해 Redis를 도입하고 관련 로직을 리팩토링하는 중요한 변경이네요. 전반적으로 기존 OAuth2AuthorizationService를 Redis 기반으로 성공적으로 교체하였고, Refresh Token 관리 로직도 Redis에 맞게 잘 구현되었습니다. 또한 JWK 엔드포인트 캐싱을 추가하여 성능을 개선한 점도 좋습니다. 코드 구조가 Redis 키 관리, 엔티티 매핑, TTL 정책 등 책임에 따라 잘 분리되어 있어 유지보수하기 좋아 보입니다. 몇 가지 코드 개선을 위한 제안 사항을 아래에 남깁니다.

@JayongLee JayongLee merged commit bf9d1fd into main Dec 4, 2025
1 check failed
@JayongLee JayongLee deleted the refactor/#61 branch December 4, 2025 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: stateless한 토큰 관리를 위한 수정 cd: health check를 위한 whitelist 수정

1 participant